﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ViewAllUsers.aspx.vb" Inherits="WebApplication1.ViewAllUsers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        View All Other Users
    </p>

    <div>
        
        <br />
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="dinerID" 
            DataSourceID="SqlDataSource1" GroupItemCount="3" style=" width:900px; left:100" >
            <AlternatingItemTemplate>
                <td runat="server" style="background-color:#FFF8DC;">
                    
                    Name:
                    <asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    &nbsp;
                    <asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("dinerID","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="150px" Width="150px" />
                    </asp:HyperLink>
                    <br />
                    Gender:
                    <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br />
                    Nationality:
                    <asp:Label ID="nationalityLabel" runat="server" 
                        Text='<%# Eval("nationality") %>' />
                    <br />
                    Date Of Birth:
                    <asp:Label ID="dateOfBirthLabel" runat="server" 
                        Text='<%# Eval("dateOfBirth") %>' />
                    <br />
                    
                </td>
            </AlternatingItemTemplate>
            <EditItemTemplate>
                <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                    Name:
                    <asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    &nbsp;
                    <asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("dinerID","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="150px" Width="150px" />
                    </asp:HyperLink>
                    <br />
                    Gender:
                    <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br />
                    Nationality:
                    <asp:Label ID="nationalityLabel" runat="server" 
                        Text='<%# Eval("nationality") %>' />
                   
                    <br />
                    Date Of Birth:
                    <asp:Label ID="dateOfBirthLabel" runat="server" 
                        Text='<%# Eval("dateOfBirth") %>' />
                    <br />
                </td>
            </EditItemTemplate>
            <EmptyDataTemplate>
                <table runat="server" 
                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                    <tr>
                        <td>
                            未返回数据。</td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
<td runat="server" />
            </EmptyItemTemplate>
            <GroupTemplate>
                <tr ID="itemPlaceholderContainer" runat="server">
                    <td ID="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
            <InsertItemTemplate>
                <td runat="server" style="">
                    Name:
                    <asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    &nbsp;
                    <asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# Eval("dinerID","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="150px" Width="150px" />
                    </asp:HyperLink>
                    <br />
                    Gender:
                    <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br />
                    Nationality:
                    <asp:Label ID="nationalityLabel" runat="server" 
                        Text='<%# Eval("nationality") %>' />
                    
                    <br />
                    Date Of Birth:
                    <asp:Label ID="dateOfBirthLabel" runat="server" 
                        Text='<%# Eval("dateOfBirth") %>' />
                    <br />
                </td>
            </InsertItemTemplate>
            <ItemTemplate>
                <td runat="server" style="background-color:#DCDCDC;color: #000000;">
                    Name:
                    <asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    &nbsp;
                    <asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl='<%# Eval("dinerID","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="150px" Width="150px" />
                    </asp:HyperLink>
                    <br />
                    Gender:
                    <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br />
                    Nationality:
                    <asp:Label ID="nationalityLabel" runat="server" 
                        Text='<%# Eval("nationality") %>' />
                    
                    <br />
                    Date Of Birth:
                    <asp:Label ID="dateOfBirthLabel" runat="server" 
                        Text='<%# Eval("dateOfBirth") %>' />
                    <br />
                </td>
            </ItemTemplate>
            <LayoutTemplate>
                <table runat="server">
                    <tr runat="server">
                        <td runat="server">
                            <table ID="groupPlaceholderContainer" runat="server" border="1" 
                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                <tr ID="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr runat="server">
                        <td runat="server" 
                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                            <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                                <Fields>
                                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                        ShowLastPageButton="True" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <SelectedItemTemplate>
                <td runat="server" 
                    style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                    Name:
                    <asp:Label ID="firstNameLabel" runat="server" Text='<%# Eval("firstName") %>' />
                    &nbsp;
                    <asp:Label ID="lastNameLabel" runat="server" Text='<%# Eval("lastName") %>' />
                    <br />
                    <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl='<%# Eval("dinerID","ViewProfile.aspx?dinerID={0}") %>'>
                        <asp:Image src='<%# Eval("protrait") %>' ID="Image1" runat="server" Height="150px" Width="150px" />
                    </asp:HyperLink>
                    <br />
                    Gender:
                    <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                    <br />
                    Nationality:
                    <asp:Label ID="nationalityLabel" runat="server" 
                        Text='<%# Eval("nationality") %>' />
                    
                    <br />
                    Date Of Birth:
                    <asp:Label ID="dateOfBirthLabel" runat="server" 
                        Text='<%# Eval("dateOfBirth") %>' />
                    <br />
                </td>
            </SelectedItemTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            SelectCommand="SELECT [dinerID], [firstName], [lastName], [gender], [nationality], [protrait], [dateOfBirth], [myDescription], [dateOfRegister] FROM [UserProfile]">
        </asp:SqlDataSource>
    </div>
</asp:Content>
